
package com.tencent.weibo.api
{
	import com.tencent.weibo.log.LevelLogger;
	import com.tencent.weibo.operation.IRequestOperation;
	import com.tencent.weibo.operation.URLRequestOperation;
	
	import flash.events.IEventDispatcher;
	
	import mx.logging.ILogger;
	
	/**
	 * 话题相关的API
	 * @langversion 3.0
	 * @playerversion Flash 9
	 * @playerversion AIR 1.1
	 *
	 */
	public class Topic extends AbstractAPI
	{
		/**
		 * 日志输出对象
		 */
		public static var logger:ILogger=LevelLogger.getLogger("com.tencent.weibo.api.Topic");
		
		/**
		 * 1.根据话名查话题id
		 * @param httexts 话题名字列表，用“,”分隔，如abc,efg（最多30个）
		 * @return IRequestOperation实例
		 */		
		public function ids(httexts:String):IRequestOperation
		{
			checkAccessToken();
			var url:String = config.urlBase+"ht/ids";
			var attachParms:Object = {};
			attachParms.httexts = httexts;
			return generateDataRequest(url,attachParms,config.requestMethod);
		}
		/**
		 * 2.根据话题id获取话题相关信息
		 * @param ids 话题id列表，用“,”分隔，如12345,12345（最多30个）
		 * @return IRequestOperation实例
		 */		
		public function info(ids:String):IRequestOperation
		{
			checkAccessToken();
			var url:String = config.urlBase+"ht/info";
			var attachParms:Object = {};
			attachParms.ids = ids;
			return generateDataRequest(url,attachParms,config.requestMethod);
		}
	}
}